/********************************************************************************
 * Project Name		[JavaSE_Fundamentals]
 * File Name     	[SwitchWithString.java]
 * Creation Date 	[2015-01-01]
 * 
 * Copyright© ge.y.yang@gmail.com All Rights Reserved
 * 
 * Work hard, play harder, think big and keep fit
 ********************************************************************************/
package jdk7;

/**
 * jdk 1.7 switch语句可以使用字符串
 * 
 * @author 不落的太阳(Sean Yang aka ShortPeace)
 * @version 1.0
 * @since jdk 1.8
 * 
 */
public class SwitchWithString {

	/**
	 * 在Switch语句中使用字符串
	 */
	public void stringInSwitch() {
		String str = "east";
		switch (str) {
		case "east":
			System.out.println("east");
			break;
		case "west":
			System.out.println("west");
			break;
		case "north":
			System.out.println("north");
			break;
		case "south":
			System.out.println("north");
			break;
		}
	}
}
